
/*!
 * \file      mixshape.cpp
 * \brief     MixShape implementation.
 * \author    Duriez Franck
 * \author    Carton Paul-Henri
 * \version   0.1
 */

#include "constant.h"
#include "assert_macros.h"
#include "mixshape.h"
#include "crazycoloredsquare.h"
#include "basicimagesquare.h"
#include "coloredsquare.h"

MixShape::MixShape(QSFMLWidget *displayWidget, QObject *parent, float *dt) : /*{{{*/
	    Shape(displayWidget, parent, dt)
{
} /*}}}*/

MixShape::~MixShape() /*{{{*/
{
} /*}}}*/

Square* MixShape::mySquareType(int*, int, ShapeType) /*{{{*/
{
	// Result
	Square* res = NULL;
	// Random number for the Square choice
	int rand = sf::Randomizer::Random(0,2);

	switch (rand) {
		case 0 :
			res = new CrazyColoredSquare(displayer, dt);
			break;
		case 1 :
			res = new ColoredSquare(displayer, dt);
			break;
		case 2 :
			res = new BasicImageSquare(displayer, dt, SQUARE_IMAGE);
			break;
	}
	return res;
} /*}}}*/
